require_dependency 'rails_generator/base'
require_dependency 'rails_generator/lookup'

# Here only to make the class instantiable in the console
require_dependency "rails_generator"

class ActsAsAddressGenerator < Rails::Generator::Base
  #default_options :force_street => false, :force_phone =>false

  self.spec = Rails::Generator::Spec.new File.basename(__FILE__), __FILE__, nil

  def initialize(runtime_args, runtime_opts = {})
    super
  end

  def manifest
    record do |m|
      m.migration_template  'migration.rb', 
                            'db/migrate',
                            :migration_file_name => "create_acts_as_address_table"
    end
  end

protected
  # Override with your own banner
  def banner
    "Usage: #{$0} acts_as_address --force_street --force_number"
  end

=begin
  def add_options!(opt)
    opt.separator ''
    opt.separator 'Options'
    opt.on("--force_street", 
           "Force street address not null in address table") {|v| options[:force_street] = v}
    opt.on("--force_phone", 
           "Force phone number not null in address table") {|v| options[:force_phone] = v}
  end
=end
end
